package admin.server.controller;

import admin.server.xxljob.SyncEmployeeFromFeiShuJob;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import admin.common.vo.ResponseVO;

/**
 * @author zgb
 * @date 2024-03-18 20:58
 * @description TODO
 */
@Slf4j
@Controller
@Tag(name = "定时任务管理")
@RequestMapping("/job")
public class JobController {


    @Autowired
    private SyncEmployeeFromFeiShuJob syncEmployeeFromFeiShuJob;

    @Operation(summary = "从飞书同步员工")
    @RequestMapping(value = "/syncEmployeeFromFeiShu", method = RequestMethod.GET)
    @ResponseBody
    public ResponseVO syncEmployeeFromFeiShu() {
        syncEmployeeFromFeiShuJob.syncEmployeeFromFeiShu();
        return ResponseVO.success();
    }

}
